package com.tledu.service.impl;

import com.tledu.mapper.UserMapper;
import com.tledu.model.User;
import com.tledu.service.IUserService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@AllArgsConstructor
public class UserService implements IUserService {
    private UserMapper userMapper;

    @Override
    public User login(User user) {
        return userMapper.login(user);
    }

    @Override
    public void register(User user) {
        userMapper.register(user);
    }

    @Override
    public List<User> selectByUserName(String username) {
        return userMapper.selectByUserName(username);
    }

    @Override
    public User selectByUserId(String userId) {
        return userMapper.selectByUserId(userId);
    }

    @Override
    public void update(User user) {
        userMapper.update(user);
    }

    @Override
    public void addressAdd(User user) {
        userMapper.addressAdd(user);
    }
}
